package com.atomos.strategy.action.life
{
	import flash.geom.Rectangle;
	
	import com.atomos.particle.Particle;
	import com.atomos.strategy.action.AbstractAction;	

	public class OutOfBoxDeadAction extends AbstractAction
	{
		protected var _rBox : Rectangle;
		
		public function OutOfBoxDeadAction ( box : Rectangle )
		{
			_rBox = box;
		}
		
		override public function process( particle : Particle ) : void
		{
			if( !_rBox.containsPoint( particle.position ) )
			{
				particle.life = particle.maxLife;
			}
		}
	}
}